<!-- File: app/views/m_users/index.ctp -->
		   	<?php
   	/**** Message ****/
   	echo $this->Session->flash();
   	?>

	<table class="table table-hover table-bordered mt40">
  		<tr>
			<th class="text-c">User ID</th>
			<th class="text-c">Username</th>
			<th class="text-c">Email</th>
			<th class="text-c">Create Date</th>
			<th class="text-c">Creator</th>
			<th class="text-c">Update Date</th>
			<th class="text-c">Updator</th>
			<th class="text-c" colspan="2">Tools</th>
		</tr>
			
		  <?php foreach ($usersinfo as $usersdata): ?>
		  <tr>
		    <td><?php echo $usersdata['MUser']['user_id']; ?></td>
		    <td>
		    <?php 
		      echo $this->Html->link($usersdata['MUser']['user_name'],
		      array('controller' => 'm_users', 'action' => 'user_detail', 
		      $usersdata['MUser']['id']));
		    ?>
		    </td>
		    <td><?php echo $usersdata['MUser']['email_address']; ?></td>
		    <td><?php echo (!empty($usersdata['MUser']['create_time'])?$usersdata['MUser']['create_time']:"Not yet"); ?></td>
		    <td><?php echo (!empty($usersdata['MUser']['creator'])?$usersdata['MUser']['creator']:"Not yet"); ?></td>
		    <td><?php echo (!empty($usersdata['MUser']['update_time'])?$usersdata['MUser']['update_time']:"Not yet"); ?></td>
		    <td><?php echo (!empty($usersdata['MUser']['updator'])?$usersdata['MUser']['updator']:"Not yet"); ?></td>
		    <td><?php echo $this->Html->link('<i class="fa fa-edit"></i> EDIT',array('action' => 'edit', $usersdata['MUser']['id']),array('escape' => FALSE,'class'=>'nodecor'));?></td>
		    <td><?php echo $this->Html->link('<i class="fa fa-warning "></i> DEL',array('action' => 'delete', $usersdata['MUser']['id']),array('escape' => FALSE,'class'=>'nodecor'),'Are you sure to delete this user?')?></td>
		  </tr>
		  <?php endforeach; ?>
  	</table> 
  	<div class='pagination fr'>
	  	<ul>
	  		<li><span><?php echo " Page ".$this->Paginator->counter();?></span></li>
		  	<li><?php echo $this->Paginator->first(' First ', null, null, array('class' => 'disabled'));?></li>
		  	<li><?php echo $this->Paginator->prev(' Prev ', null, null, array('class' => 'disabled'));?></li>
		  	<li><?php echo $this->Paginator->numbers(array('separator' => '','first'=>false));?></li>
		  	<li><?php echo $this->Paginator->next(' Next ', null, null, array('class' => 'disabled'));?></li>
		  	<li><?php echo $this->Paginator->last(' Last ', null, null, array('class' => 'disabled'));?></li>
	 	</ul>
	</div>
	<div class="clearfix"></div>
	<?php echo $this->Html->link('Add New Users', array('controller' => 'm_users', 'action' => 'add'),array('class'=>'btn-lg noradius btn-nocolor nodecor')); ?>



